from django.db import models
from django.contrib.auth.models import User
from timelineapp.models import Timeline 

class Permission(models.Model):
    timeline = models.ForeignKey(Timeline)
    user = models.ForeignKey(User)
    
    def __unicode__(self):
        return self.id

    def __str__(self):
        return self.id
    
    class Meta:
        db_table = 'Permissions'
        
class Invitation(models.Model):
    timeline = models.ForeignKey(Timeline)
    email = models.CharField(max_length=100)
    
    def __unicode__(self):
        return self.email

    def __str__(self):
        return self.email
    
    class Meta:
        db_table = 'Invitations'